/* Basic Body Structure */

* {
  margin: 0;
  padding: 0;
  font-size: 100%;
  word-wrap: break-word;
  line-height: 1.7em;
}

div.line[data-line-type="debug"] {
  display: none;
}

div.session_indicator.message_buffer_session_indicator {
  display: none;
}

/* TODO: centre it, remove the two white lines and decrease font size */
div.date_indicator {
  display: none;
}

body {
  color: #e7e7e7;
  height: 100%;
  z-index: 100;
  font-size: 11px;
  overflow: hidden;
  overflow-y: auto;
  background-color: #1f1f1f;
  font-family: "Lucida Grande";
}

body div#body_home {
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  width: 100%;
  z-index: 100;
  max-height: 99.99%;
  position: absolute;
  opacity: 0; /* Set by JavaScript */
  -webkit-transition: opacity 0.8s linear;
}

body[viewldata-line-type*="channel"] div#body_home {
  max-height: 96.5%;
}

body .line {
  margin-top: -1px;
  clear: both;
}

body[dir="rtl"] .sender {
  display: inline-block;
}

/* Scrolling */

body[data-custom-scroller="true"]::-webkit-scrollbar {
  width: 17px;
}

body[data-custom-scroller="true"]::-webkit-scrollbar:horizontal {
  height: 0;
}

body[data-custom-scroller="true"]::-webkit-scrollbar-track {
  background: #393939;
  box-shadow: inset 1px 0px 0px 0px #4b4b4b;
}

body[data-custom-scroller="true"]::-webkit-scrollbar-thumb {
  background-color: #7c7c7c;
  border: 4px solid transparent;
  border-left: 5px solid transparent;
  border-radius: 20px;
  background-clip: content-box;
}

body[data-custom-scroller="true"]::-webkit-scrollbar-thumb:hover {
  background-color: #b0b0b0;
}

/* Loading Screen */

body div#loading_screen {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -11px;
  margin-left: -150px;
  width: 300px;
  height: 21px;
  font-size: 18px;
  background: #181818;
  border: 1px solid #333333;
  border-radius: 5px;
  padding: 5px;
  padding-left: 10px;
  opacity: 1; /* Set by JavaScript */
  -webkit-transition: opacity 0.8s linear;
}

/* Time */

body[dir="ltr"] .time {
  font-size: 9px;
  color: #999;
  white-space: nowrap;
  text-transform: lowercase;
  padding-right: 10px;
}

body[dir="rtl"] .time {
  color: #999;
  white-space: nowrap;
  padding-left: 0.4em;
  display: inline-block;
}

/* Encryption Lock */

.encryptionLock img {
  float: right;
  margin: 0;
  padding: 0;
  height: 11px;
  margin-top: 2px;
  padding-left: 10px;
}

/* Links */

a {
  color: #2199ff;
  text-decoration: none;
}

a:hover {
  color: #70baff;
}

/* Topic Bar */

#topic_bar {
  top: 0;
  left: 0;
  right: 0;
  opacity: 0; /* Set by JavaScript */
  z-index: 400;
  color: #555;
  position: fixed;
  padding: 2px 0.5em 3px;
  box-shadow: 0 1px 5px #444;
  border-bottom: 1px solid #222;
  text-shadow: 1px 1px rgba(10, 10, 10, 0.7);
  background: #171814;
  -webkit-transition: opacity 0.8s linear;
  -webkit-font-smoothing: subpixel-antialiased;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Topic bar hover additions contributed with permission from the project:
	<https://github.com/hbang/Simplified-Light-Modifications> */

#topic_bar:hover {
  overflow: visible;
  white-space: normal;
}

#topic_bar a,
#topic_bar span.channel {
  color: #8e8e8e;
  border-color: #8e8e8e;
  text-shadow: 1px 1px rgba(10, 10, 10, 0.7);
}

/* Images */

.inlineImageCell {
  overflow: auto;
  display: block;
  margin-top: 15px;
  margin-bottom: 12px;
}

.inlineImageCell .image {
  display: inline-block;
  float: left;
  margin-right: 12px;
  margin-left: 10px;
  min-width: 40px;
  max-width: 90%;
}

.inlineImageCell .closeButton {
  cursor: pointer;
  border-radius: 5px;
  border: 2px solid #a1a1a1;
  color: #a1a1a1;
  display: inline-block;
  line-height: 14px;
  font-size: 15px;
  font-family: "Helvetica Neue" !important;
  text-indent: 7px;
  width: 16px;
  height: 16px;
  float: left;
  padding-right: 7px;
  padding-left: 0px;
}

html[data-system-version^="10.9"] .inlineImageCell .closeButton,
html[data-system-version^="10.8"] .inlineImageCell .closeButton {
  line-height: 13px;
}

/* Remember Line */

div[id="mark"] {
  position: relative;
  clear: both;
  z-index: 295;
  margin: 10px 0;
  border-bottom: 1px dotted;
  border-color: #444;
  -webkit-transition: 0.2s linear;
}

/* Selected User Message */

.sender {
  cursor: pointer;
}

body div.line[data-line-type*="privmsg"]:not(.selectedUser),
body div.line[data-line-type*="action"]:not(.selectedUser) {
  transition-property: border-top, border-bottom, background-color;
  transition-duration: 0.5s, 0.5s, 0.5s;
}

body div.line[data-line-type*="privmsg"] .time:not(.selectedUser),
body div.line[data-line-type*="action"] .time:not(.selectedUser) {
  transition: color 0.5s;
}

body div.line.selectedUser[data-highlight="false"] .time {
  transition: color 0.5s ease-in;
  color: #aaa;
}

body
  div.line.selectedUser[data-line-type*="privmsg"][data-member-type*="myself"]
  .time {
  color: #fff;
}

body div.line.selectedUser[data-highlight="false"] {
  transition-property: border-top, border-bottom, background-color;
  transition-duration: 0.5s, 0.5s, 0.5s;

  z-index: 190;
  position: relative;

  border-top: 0px !important;
  border-bottom: 0px !important;
  background-color: #34352d !important;
}

/* Historic Line */

#historic_messages {
  transition: opacity 0.8s ease-in;
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

#historic_messages.loaded {
  height: auto;
}

#historic_messages[isreload="false"].loaded {
  opacity: 0.6;
}

#historic_messages[isreload="true"].loaded {
  opacity: 1;
}

/* NOTICE/CTCP/WALLOPS */

body div.line[data-line-type*="ctcp"],
body div.line[data-line-type*="notice"],
body div.line[data-line-type*="wallops"] {
  color: #f00;
  z-index: 191;
  background: #400;
  position: relative;
  padding: 2px 5px 2px 5px;
  border-top: 1px solid #811;
  border-bottom: 1px solid #811;
}

body div[data-line-type*="notice"] .sender {
  color: #f00;
}

/* PRIVMSG */

body div.line[data-line-type*="privmsg"][data-highlight="false"] {
  padding: 3px 5px 3px 5px;
}

body div.line[data-line-type*="privmsg"][data-highlight="true"],
body div.line[data-line-type*="action"][data-highlight="true"] {
  padding: 2px 5px 2px 5px;
  border-top: 1px solid #988c00;
  border-bottom: 1px solid #988c00;
  background-color: #362c00 !important;
}

body div[ldata-line-type*="privmsg"] .message {
  color: #aaa;
}

body div[data-line-type*="privmsg"] p[data-member-type*="myself"] .message {
  color: #fff;
}

/* ACTION */

body div.line[data-line-type*="action"] {
  padding: 3px 5px 3px 5px;
}

body div[ldata-line-type*="action"] .message {
  color: #aaa;
}

body div[data-line-type*="action"] .sender {
  color: #aaa;
}

body div[data-line-type*="action"] p[data-member-type*="myself"] .sender,
body div[data-line-type*="action"] p[data-member-type*="myself"] .message {
  color: #ff6f6f;
}

body[dir="ltr"] div[data-line-type*="action"] .sender:before {
  content: "\2022";
  margin-right: 0.4em;
}

body[dir="ltr"] div[data-line-type*="action"] .sender:after {
  content: "";
  /* margin-right: 0.4em; */
}

body[dir="rtl"] div[data-line-type*="action"] .sender:before {
  content: "\2022";
  margin-left: 0.4em;
}

body[dir="rtl"] div[data-line-type*="action"] .sender:after {
  content: "";
  /* margin-left: 0.4em; */
}

/* DEBUG/INVITE */

body div.line[data-line-type*="invite"],
body div.line[data-line-type*="debug"],
body div.line[data-line-type*="dcc-file-transfer"],
body div.line[data-line-type*="off-the-record-encryption-status"] {
  color: #777;
  z-index: 190;
  background: #222;
  position: relative;
  padding: 2px 5px 2px 5px;
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
}

/* off-the-record-encryption-status Message Event */
body div.line[data-line-type*="off-the-record-encryption-status"] .message {
  color: #ff0000;
  font-weight: 700;
}

/* Message of the Day (MOTD) */
/* 720, 721, 722 are used by ShadowIRCd for Oper MOTD. */
/* 372, 375, 376 are normal MOTD shared by several IRCds. */

body div.line[data-command="372"],
body div.line[data-command="721"] {
  border: none;
  padding-top: 3px;
  padding-bottom: 3px;
}

body div.line[data-command="375"],
body div.line[data-command="720"] {
  /* Start. */
  border-bottom: none;
  padding-top: 2px;
  padding-bottom: 3px;
}

body div.line[data-command="376"],
body div.line[data-command="722"] {
  /* End. */
  border-top: none;
  padding-top: 3px;
  padding-bottom: 3px;
}

body div.line[data-command="372"] .message,
body div.line[data-command="375"] .message,
body
  div.line[data-command="376"]
  .message
  body
  div.line[data-command="720"]
  .message,
body div.line[data-command="721"] .message,
body div.line[data-command="722"] .message {
  font-family: "Menlo" !important;
}

/* GENERAL EVENT */

body div.line[data-line-type*="join"],
body div.line[data-line-type*="part"],
body div.line[data-line-type*="kick"],
body div.line[data-line-type*="quit"],
body div.line[data-line-type*="kill"],
body div.line[data-line-type*="nick"],
body div.line[data-line-type*="mode"],
body div.line[data-line-type*="topic"],
body div.line[data-line-type*="website"] {
  padding: 3px 5px 3px 5px;
  color: #666;
}

body[dir="ltr"] div[data-line-type*="join"] .message:before {
  content: "→";
  color: #0c0;
  /* margin-right: 0.4em; */
}

body[dir="ltr"] div[data-line-type*="kick"] .message:before,
body[dir="ltr"] div[data-line-type*="part"] .message:before,
body[dir="ltr"] div[data-line-type*="quit"] .message:before {
  content: "←";
  color: #e00;
  /* margin-right: 0.4em; */
}

body[dir="ltr"] div[data-line-type*="nick"] .message:before {
  content: "•";
  color: #0c0;
  /* margin-right: 0.4em; */
}

body[dir="rtl"] div[data-line-type*="join"] .message:before {
  content: "→";
  color: #0c0;
  /* margin-left: 0.4em; */
}

body[dir="rtl"] div[data-line-type*="kick"] .message:before,
body[dir="rtl"] div[data-line-type*="part"] .message:before,
body[dir="rtl"] div[data-line-type*="quit"] .message:before {
  content: "←";
  color: #e00;
  /* margin-left: 0.4em; */
}

body[dir="rtl"] div[data-line-type*="nick"] .message:before {
  content: "•";
  color: #0c0;
  /* margin-left: 0.4em; */
}

/* Nickname Colors */

body .inline_nickname {
}

body div[data-line-type*="privmsg"] .sender[data-member-type*="myself"] {
  color: #ff6f6f;
}

body .sender[data-member-type*="normal"][colornumber="0"],
body .inline_nickname[colornumber="0"] {
  color: #ff91fe;
}

body .sender[data-member-type*="normal"][colornumber="1"],
body .inline_nickname[colornumber="1"] {
  color: #ca91ff;
}

body .sender[data-member-type*="normal"][colornumber="2"],
body .inline_nickname[colornumber="2"] {
  color: #9194ff;
}

body .sender[data-member-type*="normal"][colornumber="3"],
body .inline_nickname[colornumber="3"] {
  color: #91d2ff;
}

body .sender[data-member-type*="normal"][colornumber="4"],
body .inline_nickname[colornumber="4"] {
  color: #91ffcf;
}

body .sender[data-member-type*="normal"][colornumber="5"],
body .inline_nickname[colornumber="5"] {
  color: #91ff94;
}

body .sender[data-member-type*="normal"][colornumber="6"],
body .inline_nickname[colornumber="6"] {
  color: #c0ff91;
}

body .sender[data-member-type*="normal"][colornumber="7"],
body .inline_nickname[colornumber="7"] {
  color: #f9ff91;
}

body .sender[data-member-type*="normal"][colornumber="8"],
body .inline_nickname[colornumber="8"] {
  color: #ffc291;
}

body .sender[data-member-type*="normal"][colornumber="9"],
body .inline_nickname[colornumber="9"] {
  color: #ff4bac;
}

body .sender[data-member-type*="normal"][colornumber="10"],
body .inline_nickname[colornumber="10"] {
  color: #e85bf9;
}

body .sender[data-member-type*="normal"][colornumber="11"],
body .inline_nickname[colornumber="11"] {
  color: #9e69ff;
}

body .sender[data-member-type*="normal"][colornumber="12"],
body .inline_nickname[colornumber="12"] {
  color: #7f99f9;
}

body .sender[data-member-type*="normal"][colornumber="13"],
body .inline_nickname[colornumber="13"] {
  color: #4bc6ff;
}

body .sender[data-member-type*="normal"][colornumber="14"],
body .inline_nickname[colornumber="14"] {
  color: #4bffdb;
}

body .sender[data-member-type*="normal"][colornumber="15"],
body .inline_nickname[colornumber="15"] {
  color: #4bff93;
}

body .sender[data-member-type*="normal"][colornumber="16"],
body .inline_nickname[colornumber="16"] {
  color: #4bff4f;
}

body .sender[data-member-type*="normal"][colornumber="17"],
body .inline_nickname[colornumber="17"] {
  color: #97ff4b;
}

body .sender[data-member-type*="normal"][colornumber="18"],
body .inline_nickname[colornumber="18"] {
  color: #e3ff4b;
}

body .sender[data-member-type*="normal"][colornumber="19"],
body .inline_nickname[colornumber="19"] {
  color: #ffb94b;
}

body .sender[data-member-type*="normal"][colornumber="20"],
body .inline_nickname[colornumber="20"] {
  color: #ff824b;
}

body .sender[data-member-type*="normal"][colornumber="21"],
body .inline_nickname[colornumber="21"] {
  color: #d05e2c;
}

body .sender[data-member-type*="normal"][colornumber="22"],
body .inline_nickname[colornumber="22"] {
  color: #cab732;
}

body .sender[data-member-type*="normal"][colornumber="23"],
body .inline_nickname[colornumber="23"] {
  color: #97de10;
}

body .sender[data-member-type*="normal"][colornumber="24"],
body .inline_nickname[colornumber="24"] {
  color: #95c990;
}

body .sender[data-member-type*="normal"][colornumber="25"],
body .inline_nickname[colornumber="25"] {
  color: #04bb5f;
}

body .sender[data-member-type*="normal"][colornumber="26"],
body .inline_nickname[colornumber="26"] {
  color: #09c1cc;
}

body .sender[data-member-type*="normal"][colornumber="27"],
body .inline_nickname[colornumber="27"] {
  color: #5baeed;
}

body .sender[data-member-type*="normal"][colornumber="28"],
body .inline_nickname[colornumber="28"] {
  color: #9d4ef6;
}

body .sender[data-member-type*="normal"][colornumber="29"],
body .inline_nickname[colornumber="29"] {
  color: #ac69cb;
}

body .sender[data-member-type*="normal"][colornumber="30"],
body .inline_nickname[colornumber="30"] {
  color: #b902c9;
}
